<p class="form-message" style="text-align: left">{$msg}</p>
<table cellspacing="1" cellpadding="0" border="0" width="50%"
	class="tblAdminDetail">
	<tr>
		<th width="100%">System User Information</th>
	</tr>
	<tr>
		<td>
		<div class="form-lable"><label for="i_user_id">{$lbl_user_id}</label></div>
		<div class="form-input"><input name="user_id" type="text"
			readonly="true" value="{$dto->user_id}" id="i_user_id" /></div>
		<br />
		<div class="form-lable"><label for="i_user_name">{$lbl_user_name}</label></div>
		<div class="form-input"><input name="user_name"
			value="{$dto->user_name}" id="i_user_name" /></div>
		<br />
		<div class="form-lable"><label for="i_password">{$lbl_password}</label></div>
		<div class="form-input"><input name="password" type="password"
			value="{$dto->password}" id="i_password" /></div>
		<br />
		<div class="form-lable"><label for="i_first_name">{$lbl_first_name}</label></div>
		<div class="form-input"><input name="first_name"
			value="{$dto->first_name}" id="i_first_name" /></div>
		<br />
		<div class="form-lable"><label for="i_last_name">{$lbl_last_name}</label></div>
		<div class="form-input"><input name="last_name"
			value="{$dto->last_name}" id="i_last_name" /></div>
		<br />
		<div class="form-lable"><label for="i_sex">{$lbl_sex}</label></div>
		<div class="form-input">{$sexHtml}</div>
		<br />
		<div class="form-lable"><label for="i_avata_url">{$lbl_avata_url}</label></div>
		<div class="form-input"><input name="avata_url"
			value="{$dto->avata_url}" id="i_avata_url" /></div>
		<br />
		<div class="form-lable"><label for="i_birthday">{$lbl_birthday}</label></div>
		<div class="form-input"><input class="date-pick" name="birthday"
			value="{$dto->birthday}" id="i_birthday" /></div>
		<br />
		<div class="form-lable"><label for="i_email">{$lbl_email}</label></div>
		<div class="form-input"><input name="email"
			value="{$dto->email}" id="i_email" /></div>
		<br />
		<div class="form-lable"><label for="i_country_code">{$lbl_country_code}</label></div>
		<div class="form-input">{$countryHtml}</div>
		<br />
		<div class="form-lable"><label for="i_city_id">{$lbl_city_id}</label></div>
		<div class="form-input">{$cityHtml}</div>
		<br />
		<div class="form-lable"><label for="i_register_date">{$lbl_register_date}</label></div>
		<div class="form-input">{$dto->register_date}&nbsp;</div>
		<br />
		<div class="form-lable"><label for="i_last_visit_date">{$lbl_last_visit_date}</label></div>
		<div class="form-input">{$dto->last_visit_date}&nbsp;</div>
		<br />
		<div class="form-lable"><label for="i_last_login_ip">{$lbl_last_login_ip}</label></div>
		<div class="form-input">{$dto->last_login_ip}&nbsp;</div>
		<br />
		<div class="form-lable"><label for="i_group_code">{$lbl_group_code}</label></div>
		<div class="form-input">{$userGroupHtml}</div>
		<br />
		</td>
	</tr>
</table>
<input name="register_date" value="{$dto->register_date}"
	id="i_register_date" type="hidden" />
<input name="last_visit_date" value="{$dto->last_visit_date}"
	id="i_last_visit_date" type="hidden" />
<input name="last_login_ip" value="{$dto->last_login_ip}"
	id="i_last_login_ip" type="hidden" />


<script>
function clickManager() {
	if ($('#is_manager').attr("checked")) {
		$("#sanhdieu-manager *").attr("disabled", "");
	}
	else {
		$("#sanhdieu-manager *").attr("disabled", "disabled");
	}
}

$.extend(DateInput.DEFAULT_OPTS, {
  stringToDate: function(string) {
    var matches;
    if (matches = string.match(/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/)) {
      return new Date(matches[3], matches[2] - 1, matches[1]);
    } else {
      return null;
    };
  },

  dateToString: function(date) {
    var month = (date.getMonth() + 1).toString();
    var dom = date.getDate().toString();
    if (month.length == 1) month = "0" + month;
    if (dom.length == 1) dom = "0" + dom;
    return dom + "/" + month + "/" + date.getFullYear();
  }
});

$(function() {
	$(".date-pick").date_input();
	
    $(".date-pick").keypress(function (e) {
    	this.input;
    });
    
    clickManager();
	
});
</script>